package com.zs.blog.converter;

import com.zs.blog.model.dto.AuthorityDTO;
import com.zs.blog.model.dto.AuthorityEditDTO;
import com.zs.blog.model.entity.Authority;
import com.zs.blog.model.vo.AuthorityLabelListVO;
import com.zs.blog.model.vo.AuthorityListVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Title: AuthorityConverter
 * @Author zs
 * @Package com.zs.blog.converter
 * @Date 2025/9/3 21:02
 * @description: 系统资源权限数据转换器
 */
@Mapper(componentModel = "spring")
public interface AuthorityConverter {
    AuthorityConverter INSTANCE = Mappers.getMapper(AuthorityConverter.class);

    List<AuthorityLabelListVO> authorityList2AuthorityLabelListVO(List<Authority> authorities);

    AuthorityListVO authorityDTO2AuthorityListVO(AuthorityDTO authorityDTO);

    Authority authorityEditDTO2Authority(AuthorityEditDTO authorityEditDTO);
}
